package com.example.javaairportflightanalysis.domin.userpojo;

import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * (User)表实体类
 *
 */
@Data
@NoArgsConstructor
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    private Integer id;

    /**
     * 用户名
     */
    @Size(min = 2,max = 5)
    @NotNull(message = "name不能为null")
    private String username;

    /**
     * 密码
     */
    @NotNull(message = "password不能为null")
    @Min(6)
    private String password;

    /**
     * 手机号
     */
    @NotNull(message = "手机号不能为null")
    @Size(min = 11, max = 11, message = "手机号必须是11位数字")
    private String phone;

    /**
     * 男 0 女 1 不详 2
     */
    @NotNull(message = "性别不能为null")
    private String sex;

    /**
     * 图片
     */
    private String img;

    /**
     * 备注
     */
    private String remark;

    private String createTime;

    private String updateTime;

}

